import request from '@/utils/request'

// 获取家庭成员列表
export function getFamilyMembers() {
  return request({
    url: '/api/family-members/list',
    method: 'get'
  })
}

// 添加家庭成员
export function addFamilyMember(data) {
  return request({
    url: '/api/family-members',
    method: 'post',
    data
  })
}

// 更新家庭成员信息
export function updateFamilyMember(id, data) {
  return request({
    url: `/api/family-members/${id}`,
    method: 'put',
    data
  })
}

// 删除家庭成员
export function deleteFamilyMember(id) {
  return request({
    url: `/api/family-members/${id}`,
    method: 'delete'
  })
}

// 获取成员健康记录
export function getMemberHealthRecords(memberId) {
  return request({
    url: `/api/family-members/${memberId}/health-records`,
    method: 'get'
  })
} 